from db.userData import UserData
from handlers.myhandler import *

class UserHandler(JSONHandler):
	
	# def safeGet(self, user):
	# 	print "processing userHandler ajax request..."
	# 	d = self.getAllParametersInDict()
	# 	userdata,modified = UserData.getUserData(user, **d)
	# 	print "Record modificato: "+str(modified)
	# 	self.response.out.write(json.dumps({
	# 			'status':0,
	# 			'resultType': modified and 'success' or "",
	# 			'msg': modified and 'Record modificato con successo' or "",
	# 			'data':userdata
	# 		}))

	def safeGet(self, user, **params):
		return UserData.getUserData(user, **params)

	def safePost(self, user, **params):
		return UserData.setUserData(user, **params)